
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglYskm.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglYskmForm"
 */
public class XtglYskmForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _yskmbh = null;
   private java.lang.String _nd = null;
   private java.lang.String _kmbm = null;
   private java.lang.String _kmmc = null;
   private java.lang.String _jjkmBz = null;
   private java.lang.String _yzjdBz = null;
   private java.lang.String _sjkmbm = null;
   private java.lang.String _kmztBz = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;
   private java.lang.String _zjxz_dm = null;
   /**
    * Standard constructor.
    */
   public XtglYskmForm() {
   }

   /**
    * Returns the yskmbh
    *
    * @return the yskmbh
    */
   public java.lang.String getYskmbh() {
      return _yskmbh;
   }

   /**
    * Sets the yskmbh
    *
    * @param yskmbh the new yskmbh value
    */
   public void setYskmbh(java.lang.String yskmbh) {
      _yskmbh = yskmbh;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the kmbm
    *
    * @return the kmbm
    */
   public java.lang.String getKmbm() {
      return _kmbm;
   }

   /**
    * Sets the kmbm
    *
    * @param kmbm the new kmbm value
    */
   public void setKmbm(java.lang.String kmbm) {
      _kmbm = kmbm;
   }
   /**
    * Returns the kmmc
    *
    * @return the kmmc
    */
   public java.lang.String getKmmc() {
      return _kmmc;
   }

   /**
    * Sets the kmmc
    *
    * @param kmmc the new kmmc value
    */
   public void setKmmc(java.lang.String kmmc) {
      _kmmc = kmmc;
   }
   /**
    * Returns the jjkmBz
    *
    * @return the jjkmBz
    */
   public java.lang.String getJjkmBz() {
      return _jjkmBz;
   }

   /**
    * Sets the jjkmBz
    *
    * @param jjkmBz the new jjkmBz value
    */
   public void setJjkmBz(java.lang.String jjkmBz) {
      _jjkmBz = jjkmBz;
   }
   /**
    * Returns the yzjdBz
    *
    * @return the yzjdBz
    */
   public java.lang.String getYzjdBz() {
      return _yzjdBz;
   }

   /**
    * Sets the yzjdBz
    *
    * @param yzjdBz the new yzjdBz value
    */
   public void setYzjdBz(java.lang.String yzjdBz) {
      _yzjdBz = yzjdBz;
   }
   /**
    * Returns the sjkmbm
    *
    * @return the sjkmbm
    */
   public java.lang.String getSjkmbm() {
      return _sjkmbm;
   }

   /**
    * Sets the sjkmbm
    *
    * @param sjkmbm the new sjkmbm value
    */
   public void setSjkmbm(java.lang.String sjkmbm) {
      _sjkmbm = sjkmbm;
   }
   /**
    * Returns the kmztBz
    *
    * @return the kmztBz
    */
   public java.lang.String getKmztBz() {
      return _kmztBz;
   }

   /**
    * Sets the kmztBz
    *
    * @param kmztBz the new kmztBz value
    */
   public void setKmztBz(java.lang.String kmztBz) {
      _kmztBz = kmztBz;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }
   
   


   public java.lang.String getZjxzDm() {
	return _zjxz_dm;
   }

   public void setZjxzDm(java.lang.String zjxzDm) {
	this._zjxz_dm = zjxzDm;
   }

/**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getYskmbh() == null) {
         errors.add("yskmbh", new ActionError("error.yskmbh.required"));
      }
      if(getNd() == null) {
         errors.add("nd", new ActionError("error.nd.required"));
      }
      if(getKmbm() == null) {
         errors.add("kmbm", new ActionError("error.kmbm.required"));
      }
      if(getKmmc() == null) {
         errors.add("kmmc", new ActionError("error.kmmc.required"));
      }
      if(getJjkmBz() == null) {
         errors.add("jjkmBz", new ActionError("error.jjkmBz.required"));
      }
      if(getKmztBz() == null) {
         errors.add("kmztBz", new ActionError("error.kmztBz.required"));
      }
      // TODO test format/data
      return errors;
   }
}
